<%--
This template is to show a list of items in a table and allow the
item to be "Shown" by the given controller.
Usage:
render(template:"/common/utils/viewShortList", model:[items: items, controller: controller, size: listSize])
<g:render template="/common/utils/viewShortList" model="[items: items, controller: controller]" />
--%>
<g:if test="${items}">
  <ul>
    <g:set var="array" value="${items.toArray()}" />
    <g:set var="size" value="3" />
    <g:if test="${array.size() <= size}">
      <g:set var="size" value="${array.size()}" />
    </g:if>
    <g:each var="i" in="${(0..<size)}">
      <li><g:link controller="${controller}" action="show" id="${array[i].id}">${array[i]?.encodeAsHTML()}</g:link></li>
    </g:each>
  </ul>
</g:if>